<%--
  Created by IntelliJ IDEA.
  User: Rui
  Date: 2018/9/27
  Time: 15:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html style="background-color: #fff;">
<head>
    <%@include file="../../../resources/inc/head.jsp" %>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body" pad15>
                    <div class="layui-form" lay-filter="">
                        <div class="layui-form-item">
                            <label class="layui-form-label">用户名</label>
                            <div class="layui-input-inline">
                                <input name="id" type="hidden" value="${permissionUser.id}">
                                <input type="text" name="userName" value="${permissionUser.userName}" readonly class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">昵称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="realName" value="${permissionUser.realName}" lay-verify="nickname" autocomplete="off" placeholder="请输入昵称" class="layui-input">
                            </div>
                        </div>
                       <%-- <div class="layui-form-item">
                            <label class="layui-form-label">性别</label>
                            <expect-x:dictSelect field="sex" typeGroupCode="sex" defaultVal="${permissionUser.gender}" type="radio"/>
                        </div>--%>
                        <%--<div class="layui-form-item">--%>
                            <%--<label class="layui-form-label">头像</label>--%>
                            <%--<expect-x:webUploader pickerId="avatar" fileList="${permissionUser.avatar}" isLocal="false" width="90" />--%>
                        <%--</div>--%>
                        <div class="layui-form-item">
                            <label class="layui-form-label">手机</label>
                            <div class="layui-input-inline">
                                <input type="text" value="${permissionUser.phone}" name="phone"  autocomplete="off"
                                       placeholder="请输入" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱</label>
                            <div class="layui-input-inline">
                                <input type="text" value="${permissionUser.email}" name="email"  autocomplete="off"
                                       placeholder="请输入" class="layui-input">
                            </div>
                        </div>
                        <%--<div class="layui-form-item layui-form-text">--%>
                            <%--<label class="layui-form-label">备注</label>--%>
                            <%--<div class="layui-input-block">--%>
                                <%--<textarea name="remarks" placeholder="请输入内容" class="layui-textarea"></textarea>--%>
                            <%--</div>--%>
                        <%--</div>--%>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="setmyinfo">确认修改</button>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>


<%@include file="../../../resources/inc/footer.jsp" %>
</body>
<script>
    var tagData = [];
    layui.config({
        base: '<%=basePath%>resources/lib/layuiAdmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        selectM: './layui/layui_extends/selectM'

    }).use(['selectM','index','jquery', 'table'], function () {
       var $ = layui.jquery
           , form = layui.form
            , table = layui.table
        ,selectM = layui.selectM;
        personId=$("#id").val();
        var selected=[];
            form.on('submit(setmyinfo)',function (e) {
               data=e.field;
                layer.load(2);
                $.ajax({
                    type: "post",
                    url: "<%=basePath%>manager/permission/user/update.action",
                    data:data,
                    success: function(data){
                        data=JSON.parse(data);
                        if(data.success){
                            layer.msg("保存成功");
                            layer.closeAll('loading');
                        }
                        else{
                            layer.closeAll('loading');
                        }
                    }
                });
            })








    });
</script>
</html>
